Skip to content

fix(facades): resolve basedpyright errors in facade stubs - #226

Merged
tmgbedu merged 1 commit into
mainfrom
fix/basedpyright-batch-2
Sep 22, 2026
Merged

tmgbedu merged 1 commit into
mainfrom
fix/basedpyright-batch-2

Conversation

@tmgbedu

@tmgbedu tmgbedu commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Batch 2 of the basedpyright cleanup. Fixes every error in 10 facade .pyi stubs: Dump, Gate, Hash, Mail, Notification, Queue, Request, Response, Session and View.

  • Facade methods are called on the class through the Facade metaclass, so these stubs now declare them as @staticmethod, following the existing Config.pyi pattern. Stray self params are removed.
  • x: str = None defaults become x: str | None = None.
  • Imports of modules this package doesn't have (..routes, ..authorization, ..mail, ..notification, ..dumps) are replaced with Any aliases.
  • Corrected varargs annotations (*objects: Any and *inputs: str, not List[...]) and View.add_location now takes loader: type[BaseLoader].

Only stubs change, so runtime behaviour and the public API are unchanged.

Results

  • basedpyright: 587 → 475 errors, 113 → 11 warnings, no new errors
  • pytest --ignore=tests/masoniteorm/postgres: 2359 passed, 7 skipped
  • 10 files changed

Remaining facade stub errors (Loader, RateLimiter, Url) are left for a later batch because of the 10-file limit.

🤖 Generated with Claude Code

Facade methods are accessed on the class via the Facade metaclass, so
the stubs now declare them as @staticmethod (matching Config.pyi), drop
stray self params, mark None defaults as optional and replace imports
of modules that do not exist in this package with Any aliases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tmgbedu
tmgbedu merged commit abf0136 into main Sep 22, 2026
4 of 6 checks passed
@tmgbedu
tmgbedu deleted the fix/basedpyright-batch-2 branch September 22, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant